package com.bobi.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bobi.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * 促销活动商品关系表(BobiPromotionGoods)实体类
 *
 * @author makejava
 * @since 2023-07-02 16:30:09
 */
@Data
@TableName("bobi_promotion_goods")
@AllArgsConstructor
@NoArgsConstructor
public class PromotionGoods extends BaseEntity {
    private static final long serialVersionUID = 451301366487119073L;

    /**
     * 商品外键
     */
    private Integer goodsId;
    /**
     * 促销活动外键
     */
    private Integer promotionId;
    /**
     * 卖出商品数量
     */
    private Integer num;
    /**
     * 冗余字段_活动开始时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    /**
     * 活动结束时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;


}

